import { markRaw } from 'vue';
import { RouteRecordRaw } from 'vue-router';
import RouterTransition from '@/components/routerTransition.vue';

const routeName = 'deviceapply';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/deviceapply',
        name: routeName,
        redirect: '/deviceapply/binding',
        component: markRaw(RouterTransition),
        meta: {
            title: 'yl.deviceapplyMgt',
            icon: 'ClusterOutlined',
        },
        children: [
            {
                path: 'binding',
                name: `${routeName}-binding`,
                meta: {
                    title: 'yl.devBindingManage',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "deviceapply" */ '@/views/deviceapply/devBinding/index.vue'),
            },
            {
                path: 'topspeed',
                name: `${routeName}-topspeed`,
                meta: {
                    title: 'yl.topspeed',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "deviceapply" */ '@/views/deviceapply/topspeed/index.vue'),
            },
            {
                path: 'scene',
                name: `${routeName}-scene`,
                meta: {
                    title: 'yl.sceneLight',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "deviceapply" */ '@/views/deviceapply/scene/index.vue'),
            },
            {
                path: 'display',
                name: `${routeName}-display`,
                meta: {
                    title: 'yl.displayTitle',
                    icon: 'Checklist',
                },
                component: () => import(/* webpackChunkName: "deviceapply" */ '@/views/deviceapply/display/index.vue'),
            },
        ],
    },
];

export default routes;
